package other.distance;

/**
 * @Author CandyWall
 * @Date 2022/8/19--1:41
 * @Description 三维空间上有n个点，每个点坐标的x∈[-a,a],y∈[-a,a],z∈[0,a],求这n个点两两之间距离和的最大值
 */
public class ThreeDimensionDistanceSolver {
    private int maxDistanceSum = 0;

    public int getMaxDistanceSum(Point[] points) {
        getMaxDistanceSum(points, 0, 0, 0);
        return 0;
    }

    /**
     *
     * @param points
     * @param distancSum
     * @param index
     * @param length
     */
    private void getMaxDistanceSum(Point[] points, int distancSum, int index, int length) {
        // distancSum += points[index]
        if (index == length) {
            maxDistanceSum = Math.max(maxDistanceSum, distancSum);
        }
    }
}
